//
//  HJWithdrawalView.m
//  Sneakers
//
//  Created by 胡光健 on 2017/9/25.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HJWithdrawalView.h"
@interface HJWithdrawalView ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UILabel *balance;// 提现余额
@property (weak, nonatomic) IBOutlet UIButton *bankBtn;
@property (weak, nonatomic) IBOutlet UILabel *bank;
@property (weak, nonatomic) IBOutlet UIButton *alipayBtn;


@end

@implementation HJWithdrawalView

-(instancetype)init {
    if (self = [super init]) {
        self = [[[NSBundle mainBundle] loadNibNamed:@"HJWithdrawalView" owner:nil options:nil] firstObject];
    }
    return self;
}
-(void)awakeFromNib {
    [super awakeFromNib];
    self.allMoney.delegate = self;
}
- (IBAction)withdrawalBtn:(UIButton *)sender {
    self.allMoney.text = self.money.text;
}

- (IBAction)pushBankListBtn:(UIButton *)sender {
    
}

- (IBAction)bankAlipay:(UIButton *)sender {
    NSNumber * selecte_num;
    sender.selected = !sender.selected;
    if (sender.selected) {
        selecte_num = @1;
    }else {
        selecte_num = @0;
    }
    [mNotificationCenter postNotificationName:@"allMoneyNotification" object:nil userInfo:@{@"num":selecte_num}];
}

-(BOOL)textFieldShouldEndEditing:(UITextField *)textField {
    [mNotificationCenter postNotificationName:@"allMoneyNotification" object:nil userInfo:@{@"money":self.allMoney.text}];
    return YES;
}
@end
